unit ProjetoDiario;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DB, DBTables, Grids, DBGrids,
 DBXpress, FMTBcd,
  DBClient, Provider, SqlExpr, ZConnection, ZAbstractRODataset,
  ZAbstractDataset, ZDataset;

type
  TFMigracao = class(TForm)
    DBGrid1: TDBGrid;
    DBGrid2: TDBGrid;
    DiarioDB: TTable;
    DataSource2: TDataSource;
    DiarioDBLancamento: TAutoIncField;
    DiarioDBData: TDateField;
    DiarioDBCredora: TStringField;
    DiarioDBDevedora: TStringField;
    DiarioDBHp: TFloatField;
    DiarioDBComplemento: TStringField;
    DiarioDBValor: TFloatField;
    DiarioDBUsuario: TStringField;
    DiarioDBReferencia: TStringField;
    DiarioDBConsolidado: TBooleanField;
    Button1: TButton;
    ZQuery1: TZQuery;
    procedure Button1Click(Sender: TObject);
    procedure DataSetProvider1AfterApplyUpdates(Sender: TObject;
      var OwnerData: OleVariant);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FMigracao: TFMigracao;

implementation

{$R *.dfm}

procedure TFMigracao.Button1Click(Sender: TObject);
var
data : date;
devedora, credora, complemento : string;
hp : double;
valor : currency;
begin
diariodb.first;
while not diariodb.eof do
 begin
 data        := diariodbdata.value;
 devedora    := diariodbdevedora.value;
 credora     := diariodbcredora.value;
 hp          := diariodbhp.value;
 complemento := diariodbcomplemento.value;
 valor       := diariodbvalor.value;
 mdosql1.

end;
end;

end.
